#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
主题: 编码解码Base64数据
问题: 你需要使用Base64格式解码或编码二进制数据。
提示 : 
"""

import base64

def recipe1():
    s = b'hello'
    print(f"{s = }")

    a = base64.b64encode(s)
    print(f"{a = }")

    print(f"{base64.b64decode(a) = }")

    print(f"{base64.b64encode(s).decode('ascii') = }")

def main():
    print('recipe1'.center(20, '*'))
    recipe1()

if __name__ == '__main__':
    main()       